/** @format */

const { merge } = require('webpack-merge');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const common = require('./webpack.common');
const server = require('./lib/server');
const plugins = require('./lib/plugins');

module.exports = merge(common, {
  mode: 'development',
  devtool: 'eval-source-map',
  devServer: {
    ...server,
  },
  plugins: [
    ...plugins,
    new ReactRefreshWebpackPlugin(),
  ],
});
